import * as types from './mutation-types'

export  const mutations = {
    [types.SET_SINGER](state,singer) {
        //singer是提交mutation要传的参数,第一个参数是固定的
        state.singer = singer;
    },
    [types.SET_PLAYING_SATATE](state,flag){
        state.playing = flag
    },
    [types.SET_FULL_STATE](state,full){
        state.fullScreen = full
    }, 
    [types.SET_PLAYLIST](state,list){
        state.playlist = list
    },
    [types.SET_SEQUENCE_LIST](state,list){
        state.sequenceList = list
    },
    [types.SET_MODE_STATE](state,mode){
        state.mode = mode
    },
    [types.SET_CURRENT_INDEX](state,index){
        state.currentIndex = index
    },
    [types.SET_DISC_STATE](state,disc){
        state.disc = disc
    },
    [types.SET_RANK_TOP_LIST_STATE](state,RankTopList){
        state.RankTopList = RankTopList
    },
    [types.SET_SEARCH_HISTORY_STATE](state,searchHistory){
        state.searchHistory = searchHistory
    },
    [types.SET_PLAY_HISTORY_STATE](state,history){
        state.playHistory = history
    },
    [types.SET_FAVORITE_LIST_STATE](state,favoriteList){
        state.favoriteList =  favoriteList
    }
}